import request from "@/util/request";

export function add(achieve){
    return request({
        url: '/achievements/add',
        method: 'post',
        data: achieve
    })
}

export function deleteById(id){
    return request({
        url: '/achievements/delete/' + id,
        method: 'delete',
    })
}

export function getList(){
    return request({
        url: '/achievements/getInitList',
        method: 'get',
    })
}
export function getAllList(){
    return request({
        url: '/achievements/getList',
        method: 'get',
    })
}

export function getAchieveById(id){
    return request({
        url: '/achievements/getById?id=' + id,
        method: 'get'
    })
}

export function update(data){
    return request({
        url: '/achievements/update',
        method: 'post',
        data: data
    })
}